//
//  HOBigImageViewer.h
//  Huahai
//
//  Created by Fox Guo on 4/8/14.
//
//

#import <UIKit/UIKit.h>
typedef enum
{
	//For Message Status Type.
	STADY_THE_LEFT = 1,
	STADY_THE_RIGHT,
	STADY_THE_MIDDLE,
	STADY_SPECIAL   //When total number is 1, need disable the both of left and right button.
}SWITCH_STATUE;

@protocol BigImageViewerDelegate;
@interface HOSingleBigImageViewer : UIScrollView<UIScrollViewDelegate, UIGestureRecognizerDelegate>
{
    UIImageView *imageView;
    NSTimer *timeoutTimer;
    CGFloat theBigScale;
    BOOL isZoom;
    CGPoint netTranslation;
	UIActivityIndicatorView *loadingView;
	
	
	UITapGestureRecognizer			*_singleTap;
	UITapGestureRecognizer			*_doubleTap;
	UIPinchGestureRecognizer		*_pinchGuesture;
	UILongPressGestureRecognizer	*_singleLongTap;
	UIPanGestureRecognizer			*_panGuesture;
}
- (void)displayLoadingView:(BOOL)isLoading;
@property(nonatomic, retain)NSString *imagePath;
@property(nonatomic, retain)UIImage *image;

@property(nonatomic, assign)id<BigImageViewerDelegate> bigImageViewerDelegate;

- (void)setData:(NSObject *)imgData;
- (UIImage *)getImageData;
@end
@protocol BigImageViewerDelegate <NSObject>


- (void)longPress:(UILongPressGestureRecognizer *)longPress;
- (void)tapGesture;
-(void)panGesture:(UIPanGestureRecognizer *)recognizer;

@end


@protocol HOBigImageViewerDelegate;
@interface HOBigImageViewer : UIView <UIGestureRecognizerDelegate, BigImageViewerDelegate>
{

    BOOL canNext;
    BOOL canPrevious;
    BOOL isAnimating;
    NSInteger totalIndex;
    NSInteger currentIndex;
    BOOL isDisable;
    SWITCH_STATUE switchStatus;
	NSMutableArray *slideArray;
	
}

- (id)initWithFrame:(CGRect)frame andData:(NSArray *)images andImageindex:(int)imgindex;
@property(nonatomic, assign)id<HOBigImageViewerDelegate> delegate;
@end
@protocol HOBigImageViewerDelegate <NSObject>

- (void)imageViewerDidClose;
- (void)longPress:(UILongPressGestureRecognizer *)longPress withImageData:(UIImage *)imageData;
- (void)updateCurrentIndex:(NSInteger)index total:(NSInteger)total;

@end